﻿Imports System.Data  


Public Class CBitFolioDec


Public Enum estatusFolioDec 
  PENDIENTE = 0
  PROCESADO_CORRECTO = 1
  PROCESADO_INCORRECTO = 2
End Enum




Private _id              As Integer 
Private _folioDec        As String 
Private _funcionId       As Integer 
Private _intemediario    As Integer 
Private _fechaProc       As Date 
Private _funcionDesc     As String 
Private _archivoAsociado As String 
Private _estatus         As CBitFolioDec.estatusFolioDec  
Private _estatusDes      As String  




Public Sub new (ByRef registro As DataRow )

_id           = registro("ID")     
_folioDec     = IIf (IsDBNull (registro("FOLIO_DEC")),"",registro("FOLIO_DEC"))
_funcionId    = registro("FUNCION_ID")
_intemediario = registro("INTERMEDIARIO")
_funcionDesc  = registro("FUNCION")     
_fechaProc    = registro("FECHA_PROC")     
_estatus      = registro("ESTATUS")    
_estatusDes   =  registro("ESTATUS_DES")    
_archivoAsociado  = registro("NOM_ARCHIVO")     
End Sub


Public Sub new (ByVal folio As String, ByVal funId As CAreaFuncion.Funciones  , byval intermediario As Integer  )

_folioDec     = folio 
_funcionId    = funId 
_intemediario = intermediario 
_estatus = CBitFolioDec.estatusFolioDec.PENDIENTE   
End Sub



Public Sub new (ByVal funId As CAreaFuncion.Funciones, byval intermediario As Integer,ByVal archivoAsociado As String, ByVal estatus As CBitFolioDec.estatusFolioDec  )
_folioDec  = ""
_archivoAsociado = archivoAsociado 
_funcionId    = funId 
_intemediario = intermediario 
_estatus = estatus 
End Sub



Public Property Id() As Integer 
    Get
        Return _id
    End Get
    Set(ByVal value As Integer )
        _id = value
    End Set
End Property


Public Property FolioDec() As String
    Get
        Return _folioDec
    End Get
    Set(ByVal value As String)
        _folioDec = value
    End Set
End Property


Public Property FuncionDesc() As String
    Get
        Return _funcionDesc 
    End Get
    Set(ByVal value As String)
        _funcionDesc  = value
    End Set
End Property




Public Property FuncionId() As  CAreaFuncion.Funciones 
    Get
        Return _funcionId
    End Get
    Set(ByVal value As CAreaFuncion.Funciones)
        _funcionId = value
    End Set
End Property




Public Property Intermediario() As Integer 
    Get
        Return _intemediario 
    End Get
    Set(ByVal value As Integer )
        _intemediario  = value
    End Set
End Property




Public Property FechaProc() As date
    Get
        Return _fechaProc 
    End Get
    Set(ByVal value As date)
        _fechaProc = value
    End Set
End Property



Public Property ArchivoAsociado() As String
    Get
        Return _archivoAsociado 
    End Get
    Set(ByVal value As String)
        _archivoAsociado = value
    End Set
End Property


Public Property Estatus() As CBitFolioDec.estatusFolioDec  
    Get
        Return _estatus  
    End Get
    Set(ByVal value As CBitFolioDec.estatusFolioDec)
        _estatus  = value
    End Set
End Property


Public Property EstatusDes() As String 
    Get
        Return _estatusDes   
    End Get
    Set(ByVal value As String )
        _estatusDes  = value
    End Set
End Property



End Class
